<template>
  <div style="display: inline">
    <el-button type="info" class="mgr10 mgb10" @click="jumpProcureInfo">查看采购单</el-button>
  </div>
</template>

<script>

export default {
  name: "ProcureButton",
  props:{
    procureNo:{
      type: String,
      required: true
    },
    procureType:{
      type: [Number,String],
      required: true,
    }
  },
  methods:{
    jumpProcureInfo(){
      const { href } = this.$router.resolve({
        name: this.procureType === 3 ? 'procureOrderPreviewOrder' : 'procureOrderInfo',
        query: {
          procureNo: this.procureNo
        }
      })
      window.open(href,'_blank')
    }
  }
}
</script>

<style scoped>

</style>
